package com.handong.handserialprogram.model.entities;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/20.
 */

public class MissionEntity implements Parcelable,Serializable{


    /**
     * taskName : 任务1
     * taskStartDate : 2016/11/4 11:34:01
     * taskBeginPlace : 西部智谷
     * taskEndPlace : 白果林
     * taskId : 39
     * taskPlanningRouteId : 88
     * taskStatue : 1
     * taskDescription : 111
     */

    private String taskName;
    private String taskStartDate;
    private String taskId;
    private String taskPlanningRouteId;
    private String taskEscortCar;
    private int taskType;
    private boolean taskHasCriminal;
    private boolean pInTask;//是否属于该任务
    private boolean canJoin;

    public boolean isCanJoin() {
        return canJoin;
    }

    public void setCanJoin(boolean canJoin) {
        this.canJoin = canJoin;
    }

    public ArrayList<CriminalEntity> getCriminal() {
        return criminal;
    }

    public void setCriminal(ArrayList<CriminalEntity> criminal) {
        this.criminal = criminal;
    }

    private ArrayList<CriminalEntity> criminal;

    public MissionEntity(){}

    protected MissionEntity(Parcel in) {
        taskName = in.readString();
        taskStartDate = in.readString();
        taskId = in.readString();
        taskPlanningRouteId = in.readString();
        taskEscortCar = in.readString();
        in.readTypedList(criminal,CriminalEntity.CREATOR);
    }

    public static final Creator<MissionEntity> CREATOR = new Creator<MissionEntity>() {
        @Override
        public MissionEntity createFromParcel(Parcel in) {
            return new MissionEntity(in);
        }

        @Override
        public MissionEntity[] newArray(int size) {
            return new MissionEntity[size];
        }
    };

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskStartDate() {
        return taskStartDate;
    }

    public void setTaskStartDate(String taskStartDate) {
        this.taskStartDate = taskStartDate;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskPlanningRouteId() {
        return taskPlanningRouteId;
    }

    public void setTaskPlanningRouteId(String taskPlanningRouteId) {
        this.taskPlanningRouteId = taskPlanningRouteId;
    }

    public String getTaskEscortCar() {
        return taskEscortCar;
    }

    public void setTaskEscortCar(String taskEscortCar) {
        this.taskEscortCar = taskEscortCar;
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }

    public boolean isTaskHasCriminal() {
        return taskHasCriminal;
    }

    public void setTaskHasCriminal(boolean taskHasCriminal) {
        this.taskHasCriminal = taskHasCriminal;
    }

    public boolean ispInTask() {
        return pInTask;
    }

    public void setpInTask(boolean pInTask) {
        this.pInTask = pInTask;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(taskName);
        dest.writeString(taskStartDate);
        dest.writeString(taskId);
        dest.writeString(taskPlanningRouteId);
        dest.writeString(taskEscortCar);
        dest.writeTypedList(criminal);
    }
}
